list to listselectlistitem c#

108

list to list<selectlistitem> c# </selectlistitem> -

List&lt;SelectListItem&gt; item = YearList.ConvertAll(a =&gt;
                {
                    return new SelectListItem()
                    {
                        Text = a.ToString(),
                        Value = a.ToString(),
                        Selected = false
                    };
                });

Comments

Submit
0 Comments